﻿@{
    ViewBag.Title = "房产管理";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script src="~/Content/scripts/jquery/layer/jquery.js?v=1.83.min"></script>
<script src="~/Content/scripts/jquery/jquery-2.0.3.min.js"></script>
<script src="~/Content/scripts/jquery/layer/layer.min.js"></script>
<link href="~/Content/styles/font-awesome.min.css" rel="stylesheet" />
<link href="~/Content/styles/BillDetail.css?v=1.1" rel="stylesheet" />
<link href="~/Content/styles/anitmate.css" rel="stylesheet" />
<link href="~/Content/styles/style.css" rel="stylesheet" />
<link href="~/Content/scripts/plugins/tree/tree.css" rel="stylesheet" />
<link href="~/Content/scripts/plugins/jqgrid/jqgrid.css" rel="stylesheet" />
<script src="~/Content/scripts/plugins/tree/tree.js"></script>
<script src="~/Content/scripts/plugins/jqgrid/grid.locale-cn.js"></script>
<script src="/Content/scripts/plugins/validator/js?v=XgpF3bkqcHESsLip2j1dhS6n2I-zHyD2VCazpanqH6Q1"></script>
<script src="/Content/scripts/utils/js?v=FNqaC7G7A87_J4VCIQpQEAO-d_2Qf2wSxoZexwRzulo1"></script>
<script src="~/Content/scripts/plugins/jqgrid/jqgrid.min.js"></script>
<script src="~/Content/scripts/jquery/ajaxfileupload.js"></script>
<link href="~/Content/scripts/plugins/uploadify/uploadify.css" rel="stylesheet" />
<link href="~/Content/scripts/plugins/uploadify/uploadify.extension.css" rel="stylesheet" />
<script src="~/Content/scripts/plugins/uploadify/jquery.uploadify.js"></script>
<style type="text/css">
    html, body {
        background-color: #fff;
    }
</style>
<script>
    var keyValue = request('keyValue');
    var organizeId = request('organizeId');
    var parentId = "";
    var _Id = "";
    var _type = 1;//房产性质默认为楼盘
    var _ptype;
    var allname = "";
    var Code = '@ViewBag.GCode';
    var list = [];
    $(function () {
        //checkBillCode('Code', '@ViewBag.GCode');
        uploadify();
        uploadify1();
        initControl();
    })


    function setDisplay() {
        switch (_type) {
            case 1: {
                $('#PProperty').css("display", "block");
                $('#PPavilion').css("display", "none");
                $('#PGarage').css("display", "none");
                $('#PFloor').css("display", "none");
                $('#PRoom').css("display", "none");
                $("#HouseO").css("display", "none");
                $("#PropertyMemo").append($("#Memo"));
                $("#PropertyArea").append($("#Area"));
                $(".MainPic").show();
            } break;
            case 2: {
                $('#PProperty').css("display", "none");
                $('#PPavilion').css("display", "block");
                $('#PGarage').css("display", "none");
                $('#PFloor').css("display", "none");
                $('#PRoom').css("display", "none");
                $("#HouseO").css("display", "none");
                $(".MainPic").hide();
            } break;
            case 3: {
                $('#PProperty').css("display", "none");
                $('#PPavilion').css("display", "none");
                $('#PGarage').css("display", "block");
                $('#PFloor').css("display", "none");
                $('#PRoom').css("display", "none");
                $("#HouseO").css("display", "none");
                $(".MainPic").hide();
            } break;
            case 4: {
                $('#PProperty').css("display", "none");
                $('#PPavilion').css("display", "none");
                $('#PGarage').css("display", "none");
                $('#PFloor').css("display", "block");
                $('#PRoom').css("display", "none");
                $("#HouseO").css("display", "none");
                $(".MainPic").hide();
            } break;
            case 5:
            case 7: {
                $('#PProperty').css("display", "none");
                $('#PPavilion').css("display", "none");
                $('#PGarage').css("display", "none");
                $('#PFloor').css("display", "none");
                $('#PRoom').css("display", "block");
                $("#HouseO").css("display", "block");
                $("#RoomMemo").append($("#Memo"));
                $("#RoomArea").append($("#Area"));
                $(".MainPic").show();
            } break;
        }
    }
    function setPStructTree() {
        $("#PStructTree").ComboBoxTree({
            url: "../../ResourceManage/RS_PStructs/GetTreeJson?type=" + _type + "&organizeid=" + organizeId,
            height: "250px",
            description: "==请选择==",
            click: function (item) {

                if (parentId != item.id) {
                    _ptype = parseInt(item.Type);
                    allname = item.PSAllName;
                    parentId = item.id;
                    $("#AllName").val(item.PSAllName);
                }
            }
        });
    }

    //加载房间物品表格
    function GetGrid() {
        var ProductName, ProductDirt;
        $.SetForm({
            url: "../../SystemManage/DataItemDetail/GetDataItemListJson",
            param: { EnCode: "ProductName" },
            success: function (data) {
                ProductName = data;
            }
        });
        $.SetForm({
            url: "../../SystemManage/DataItemDetail/GetDataItemListJson",
            param: { EnCode: "ProductDirt" },
            success: function (data) {
                ProductDirt = data;
            }
        });
        var $gridTable = $("#gridTable");
        $gridTable.jqGrid({
            datatype: "json", 
            height: $(window).height() - 161.5,
            autowidth: true,
            unwritten: false,
            colModel: [
                    { label: 'ID', name: 'Id', hidden: true },
                    { label: '部位', name: 'PSMemo', width: 100, align: "left", sortable: true },
                    { label: '物品名称', name: 'Name', width: 100, align: "left", sortable: true },
                    {
                        label: "部位", name: "PSMemoValue", width: 100, align: "left", sortable: true, hidden: true,
                        formatter: function (cellvalue, options, rowObject) {
                            if (!!cellvalue) return cellvalue;
                            var Id = "";
                            $(ProductDirt).each(function (index, data) {
                                if (data.ItemName == rowObject.PSMemo) {
                                    Id = data.ItemDetailId;
                                    return;
                                }
                            });
                            return Id;
                        }
                    },
                    {
                        label: "物品名称", name: "NameValue", width: 100, align: "left", sortable: true, hidden: true,
                        formatter: function (cellvalue, options, rowObject) {
                            if (!!cellvalue) return cellvalue;
                            var Id = "";
                            $(ProductName).each(function (index, data) {
                                if (data.ItemName == rowObject.Name) {
                                    Id = data.ItemDetailId;
                                    return;
                                }
                            });
                            return Id;
                        }
                    },
                    { label: '物品编号', name: 'Code', width: 100, align: "left", sortable: false },
                    { label: "规格型号", name: "ModelNo", width: 100, align: "left", sortable: false },
                    { label: "数量", name: "Num", width: 100, align: "left", sortable: false },
                    { label: "赔偿单价", name: "UnitPrice", width: 100, align: "left", sortable: false },
                    { label: "备注", name: "Memo", width: 330, align: "left", sortable: false },
            ],
            caption: "房间物品",
            rowNum: "1000",
            rownumbers: true,
            shrinkToFit: false,
            gridview: true,
            hidegrid: false
        });
    }

    //添加房间物品信息
    function btn_add_field() {
        dialogOpen({
            id: "RoomDetailList",
            title: '添加房间物品信息',
            url: '../../ResourceManage/RS_PStructs/RoomDetailList',
            width: "500px",
            height: "350px",
            callBack: function (iframeId) {
                top.frames[iframeId].AcceptClick();
            }
        });
    };
    //修改
    function btn_edit_field() {
        var keyValue = $("#gridTable").getGridParam('selrow');
        if (checkedRow(keyValue)) {
            dialogOpen({
                id: "RoomDetailList",
                title: '修改房间物品信息',
                url: '../../ResourceManage/RS_PStructs/RoomDetailList?keyValue=' + keyValue,
                width: "500px",
                height: "350px",
                callBack: function (iframeId) {
                    top.frames[iframeId].AcceptClick();
                }
            });
        }
    }
    //删除
    function btn_delete_field() {
        var keyValue = $("#gridTable").getGridParam('selrow');
        if (keyValue) {
            dialogConfirm('注：您确定要移除吗？该操作将无法恢复？', function (r) {
                if (r) {
                    $("#gridTable").delRowData(keyValue);
                    dialogMsg("移除成功。", 1);
                }
            });

        } else {
            dialogMsg('请选择需要移除的数据！', 0);
        }
    }

    //初始化控件
    function initControl() {
        //省市区联动
        $("#Province").ComboBoxTree({
            url: "../../SystemManage/Area/GetTreeJson",
            param: { parentId: "0" },
            description: "===选择省===",
            allowSearch: true,
            icon: true,
            height: "170px",
            click: function (item) {
                GetCityTreeJson(item.value);
                $("#LAT").val(item.LAT);
                $("#LNG").val(item.LON);
            }
        })
        //城市
        $("#City").ComboBoxTree({
            description: "===选择市===",
            height: "170px",
            allowSearch: true
        })
        //县/区
        $("#Region").ComboBoxTree({
            description: "===选择县/区===",
            allowSearch: true,
            height: "170px"
        })
        //乡镇街道
        $("#Township").ComboBox({
            description: "===选择乡镇街道===",
            allowSearch: true,
            height: "170px"
        });

        //所属机构
        $("#OrganizeId").ComboBoxTree({
            url: "../../BaseManage/Organize/GetTreeJson",
            description: "==请选择==",
            height: "250px",
            click: function (item) {
                if (item.id != organizeId) {
                    organizeId = item.id;
                    //allname = item.text;
                    parentId = "";
                    setPStructTree();
                }
            }
        });



        $("#Bois").click(
           function () {
               $("#ImageInfo").hide();
               $("#roomPanel").hide();
           }
           );
        $("#ImIn").click(
            function () {
                $("#ImageInfo").show();
                $("#roomPanel").hide();
            }
            );
        $("#HouseO").click(
            function () {
                $("#ImageInfo").hide();
                $("#roomPanel").show();
            }
            );
        $("#Other").click(
            function () {
                $("#ImageInfo").hide();
                $("#roomPanel").hide();
            }
            );


        if (!!organizeId) {
            $("#OrganizeId").ComboBoxTreeSetValue(organizeId);
            //allname = $("#OrganizeId").attr("data-text");
        }
        //上级房产
        setPStructTree();

        //房产性质
        $("#Type").ComboBox({
            // data: [{ "key": 1, "value": "楼盘" }, { "key": 2, "value": "楼阁|楼栋|单元|梯" }, { "key": 3, "value": "车库|广告位区域|场地区域|冷库" }, { "key": 4, "value": "楼层|网点" }, { "key": 5, "value": "房间|床位" }],
            url: "../../SystemManage/DataItemDetail/GetDataItemTreeJson",
            param: { EnCode: "PstructType" },
            id: "value",
            text: "text",
            height: "200px",
            description: "==请选择==",
        }).bind("change", function () {
            _type = parseInt($("#Type").attr("data-value"));
            setDisplay();
            //上级房产
            setPStructTree();
        });
        $("#Type").ComboBoxSetValue("1");
        //当前状态
        $("#State").ComboBox({
            data: [{ "key": 0, "value": "准备房" }, { "key": 1, "value": "待租" }, { "key": 2, "value": "已选取" }, { "key": 3, "value": "已租" }, { "key": 4, "value": "自用" }, { "key": 5, "value": "已售" }, { "key": 6, "value": "续租中" }, { "key": 7, "value": "维修中" }],
            id: "key",
            text: "value",
            height: "200px"
        });
        $("#State").ComboBoxSetValue("0");
        $("#State").attr("disabled", "disabled");

        //朝向
        $("#HouseType").ComboBox({
            url: "../../SystemManage/DataItemDetail/GetDataItemTreeJson",
            param: { EnCode: "HouseDirect" },
            id: "text",
            text: "text",
            description: "==请选择==",
        });
        //户型
        $("#HouseTypeName").ComboBox({
            url: "../../SystemManage/DataItemDetail/GetDataItemTreeJson",
            param: { EnCode: "HouseType" },
            id: "value",
            text: "text",
            description: "==请选择==",
        });
        //项目类型
        $("#PropertyType1").ComboBox({
            url: "../../SystemManage/DataItemDetail/GetDataItemTreeJson",
            param: { EnCode: "ProjectType" },
            id: "text",
            text: "text",
            height: "200px",
            description: "==请选择==",
        });
        //物业类型
        $("#PropertyType2").ComboBox({
            url: "../../SystemManage/DataItemDetail/GetDataItemTreeJson",
            param: { EnCode: "PropertyType" },
            id: "text",
            text: "text",
            height: "200px",
            description: "==请选择==",
        });
        GetGrid();
        //添加用户
        $("#btn_User").click(function () {
            if (_UserType == 0) {
                $("#UserTable").html(_UserTable); $(this).attr("value", "返回"); _UserType = 1;
            } else {
                $("#UserTable").html(""); $(this).attr("value", "添加"); _UserType = 0;
            }
        });

        //获取表单
        if (!!keyValue) {
            $.SetForm({
                url: "../../ResourceManage/RS_PStructs/GetFormInfoJson",
                param: { keyValue: keyValue },
                success: function (data) {
                    parentId = data.data.ParentId;
                    organizeId = data.data.OrganizeId;
                    $("#OrganizeId").ComboBoxTreeSetValue(organizeId);
                    _type = parseInt(data.data.Type);
                    if (!!data.FileList) {
                        list = data.FileList;
                        var _html = "";
                        $(list).each(function (index, item) {
                            _html += '<div id="item_0_' + index + '" class="uploadify-queue-item"><a class="succeed" title="成功"><i class="fa fa-check-circle"></i></a><a class="succeed" title="删除" onclick=\'removeFile(' + JSON.stringify(item) + ',this)\'><i class="fa fa-times-circle"></i></a><div style="float:left;width:50px;margin-right:2px;"><img src="/Content/images/filetype/' + item.FileName.substring(item.FileName.lastIndexOf(".") + 1) + '.png" style="width:40px;height:40px;"></div><span class="fileName">' + item.FileName + '</span><span class="data"> </span></div>'
                        });
                        $("#uploadify-queue").append(_html);
                    }
                    $("#Type").attr("disabled", "disabled");
                    setDisplay();
                    if (!!data.data.AllName) {
                        allname = data.data.AllName.substring(0, data.data.AllName.indexOf('/' + data.data.Name));
                    }
                    if (!!data.data.MainPic) $("#MainPicImg").attr("src", data.data.MainPic);
                    switch (data.data.Type) {
                        case 1:
                            $("#PProperty").SetWebControls(data.model); $("#PropertyType1").ComboBoxSetValue(data.model.PropertyType);
                            $("#Province").ComboBoxSetValue(data.model.Province); if (!!data.model.Province) GetCityTreeJson(data.model.Province);
                            $("#City").ComboBoxSetValue(data.model.City); if (!!data.model.City) GetRegionTreeJson(data.model.City);
                            $("#Region").ComboBoxSetValue(data.model.Region); if (!!data.model.Region) GetTownshipTreeJson(data.model.Region);
                            $("#Township").ComboBoxSetValue(data.model.Township); $("#Date").val(formatDate(data.model.Date, 'yyyy-MM-dd'));
                            _Id = data.model.Id;
                            break;
                        case 2: $("#PPavilion").SetWebControls(data.model); $("#CoverAreaPavilion").val(data.model.CoverArea); $("#DatePavilion").val(formatDate(data.model.Date, 'yyyy-MM-dd')); _Id = data.model.Id; break;
                        case 3: $("#PGarage").SetWebControls(data.model); $("#AreaGarage").val(data.model.Area); $("#DateGarage").val(formatDate(data.model.Date, 'yyyy-MM-dd')); _Id = data.model.Id; break;
                        case 4: $("#PFloor").SetWebControls(data.model); $("#AreaFloor").val(data.model.Area); _Id = data.model.Id; break;
                        case 5: $("#PRoom").SetWebControls(data.model.RoomInfo);
                            $("#EMoveInDate").val(formatDate(data.model.RoomInfo.EMoveInDate, 'yyyy-MM-dd'));
                            $("#State").ComboBoxSetValue(data.model.RoomInfo.State);
                            $("#PropertyType2").ComboBoxSetValue(data.model.RoomInfo.PropertyType);
                            $("#HouseTypeName").ComboBoxSetValue(data.model.RoomInfo.HouseTypeName);
                            $("#HouseType").ComboBoxSetValue(data.model.RoomInfo.HouseType);
                            _Id = data.model.RoomInfo.Id;
                            $("#gridTable")[0].addJSONData(data.model.RoomDetailList);
                            if (data.pType == 5) {
                                _ptype = 5;
                                _type = 7;
                            }
                            break;
                        default:
                    }
                    $("#BaseInfo").SetWebControls(data.data);
                    setPStructTree();
                    //上级房产
                    $("#PStructTree").ComboBoxTreeSetValue(data.data.ParentId == "0" ? data.data.OrganizeId : data.data.ParentId);
                    $("#Type").ComboBoxSetValue(data.data.Type);
                    if (_ptype == 5)
                        $("#Type").ComboBoxSetValue("7");
                }
            });
        }
    };


    //获取市级列表
    function GetCityTreeJson(value) {
        $("#City").removeAttr("data-value").removeAttr("data-text").find(".ui-select-text").css("color", "#999").text("===选择市===");
        $("#Region").removeAttr("data-value").removeAttr("data-text").find(".ui-select-text").css("color", "#999").text("===选择县/区===");
        $("#Township").removeAttr("data-value").removeAttr("data-text").find(".ui-select-text").css("color", "#999").text("===选择乡镇街道===");
        $("#City").ComboBoxTree({
            url: "../../SystemManage/Area/GetTreeJson",
            param: { value: value },
            icon: true,
            allowSearch: true,
            height: "170px",
            click: function (item) {
                GetRegionTreeJson(item.value);
                $("#LAT").val(item.LAT);
                $("#LNG").val(item.LON);
            }
        });
    }

    //获取县级列表
    function GetRegionTreeJson(value) {
        $("#Region").removeAttr("data-value").removeAttr("data-text").find(".ui-select-text").css("color", "#999").text("===选择县/区===");
        $("#Township").removeAttr("data-value").removeAttr("data-text").find(".ui-select-text").css("color", "#999").text("===选择乡镇街道===");
        $("#Region").ComboBoxTree({
            url: "../../SystemManage/Area/GetTreeJson",
            param: { value: value },
            icon: true,
            allowSearch: true,
            height: "170px",
            click: function (item) {
                GetTownshipTreeJson(item.value);
                $("#LAT").val(item.LAT);
                $("#LNG").val(item.LON);
            }
        });
    }

    //获取乡镇街道列表
    function GetTownshipTreeJson(value) {
        $("#Township").removeAttr("data-value").removeAttr("data-text").find(".ui-select-text").css("color", "#999").text("===选择乡镇街道===");
        $("#Township").ComboBoxTree({
            url: "../../SystemManage/Area/GetTreeJson",
            param: { value: value },
            icon: true,
            allowSearch: true,
            height: "170px",
            click: function (item) {
                $("#LAT").val(item.LAT);
                $("#LNG").val(item.LON);
            }
        });
    }

    //根据完整地址获取经纬度
    function GetGeocoding() {
        if (!!$("#Address").val()) {
            var address = $("#Province").attr("data-text") + $("#City").attr("data-text") + $("#Region").attr("data-text") + $("#Township").attr("data-text") + $("#Address").val();
            //$.SetForm({
            //    url: "../../ResourceManage/RS_PStructs/GetGeocoding",
            //    param: { address: address },
            //    success: function (data) {
            //        if (!!data.Data) {
            //            $("#LAT").val(data.Data.lat);
            //            $("#LNG").val(data.Data.lng);
            //        }
            //    }
            //});
            $.ajax({
                url: "../../ResourceManage/RS_PStructs/GetGeocoding",
                type: "GET",
                async: false,
                data: { "address": address },
                success: function (data) {
                    if (!!data && !!data.Data) {
                        $("#LAT").val(data.Data.lat);
                        $("#LNG").val(data.Data.lng);
                    }
                }
            });
        }
    }

    //保存表单
    function AcceptClick(obj) {
        if (!$('#BaseInfo').Validform()) {
            return false;
        }

        var postData1 = $("#BaseInfo").GetWebControls(keyValue);
        postData1["AllName"] = allname != "" ? allname + "/" + postData1["Name"] : postData1["Name"];
        if (!postData1["MainPic"]) {
            postData1["MainPic"] = "";
        }
        var postData2 = "", postData3 = "", postData4 = "", postData5 = "", postData6 = "";
        postData1["ParentId"] = !!parentId ? parentId : "0";

        if ('@ViewBag.FCCode') {
            postData1["Code"] = '@ViewBag.FCCode';
        }
        if (!keyValue && !postData1["Code"]) {
            dialogMsg('请输入编码！', 0); return false;
        }
        if (_type == 7) {
            if (_ptype != 5) {
                dialogMsg('床位上级只能选择房间！', 0); return false;
            }
        }
        switch (_type) {
            case 1: {
                postData2 = $("#PProperty").GetWebControls(keyValue);
                postData2["Id"] = _Id;
                if ($("#PropertyType1").attr("data-text") != "==请选择==")
                    postData2["PropertyType"] = $("#PropertyType1").attr("data-text");
            } break;
            case 2: {
                postData3 = $("#PPavilion").GetWebControls(keyValue);
                postData3["Id"] = _Id;

                postData3["Date"] = postData3["DatePavilion"];
                postData3["CoverArea"] = postData3["CoverAreaPavilion"];
            } break;
            case 3: {
                postData4 = $("#PGarage").GetWebControls(keyValue);
                postData4["Area"] = postData4["AreaGarage"];
                postData4["Date"] = postData4["DateGarage"];
                postData4["Id"] = _Id;

            } break;
            case 4: {
                postData5 = $("#PFloor").GetWebControls(keyValue);
                postData5["Area"] = postData5["AreaFloor"];
                postData5["Id"] = _Id;

            } break;
            case 5:
            case 7:
                {
                    postData1["JuniorNum"] = $("#JuniorNum").val();
                    var roomArr = new Array;
                    var roomArr = $("#gridTable").jqGrid("getRowData");
                    var Data6 = $("#PRoom").GetWebControls(keyValue);
                    if ($("#PropertyType2").attr("data-text") != "==请选择==")
                        Data6["PropertyType"] = $("#PropertyType2").attr("data-text");
                    if ($("#HouseType").attr("data-text") != "==请选择==")
                        Data6["HouseType"] = $("#HouseType").attr("data-text");
                    Data6["HouseTypeName"] = $("#HouseTypeName").attr("data-value");
                    Data6["SplitedMark"] = 0;
                    Data6["Id"] = _Id;
                    postData1["Type"] = 5;
                    postData6 = {
                        RoomDetailList: roomArr,
                        RoomInfo: Data6
                    };
                    if (_type == 7) {
                        Data6["SplitedMark"] = 2;
                        _type = 5;
                    }
                    else if (_ptype == 5) Data6["SplitedMark"] = 3;
                } break;
            default:
        }
        //UploadFile();
        $.SaveForm({
            url: "../../ResourceManage/RS_PStructs/SaveForm",
            param: {
                "KeyValue": keyValue, "Type": _type, "BaseInfo": JSON.stringify(postData1), "PProperty": JSON.stringify(postData2),
                "PPavilion": JSON.stringify(postData3), "PGarage": JSON.stringify(postData4), "PFloor": JSON.stringify(postData5), "PRoom": JSON.stringify(postData6), "list": JSON.stringify(list)
            },
            loading: "正在保存数据...",
            success: function () {
                $.currentIframe().$("#gridTable").resetSelection();
                $.currentIframe().$("#gridTable").trigger("reloadGrid");
            }
        });


    };
</script>
<script>
    $(function () {
        //关闭
        $(".photo-close").click(function () {
            $(".photo-mask").hide();
            $(".photo-panel").hide();
        });
    })
    //上传文件
    function uploadify() {
        $("#uploadify").uploadify({
            method: 'post',
            uploader: '/ResourceManage/RS_PStructs/UploadifyFile',
            swf: top.contentPath + '/Content/scripts/plugins/uploadify/uploadify.swf',
            buttonText: "添加文件",
            fileSizeLimit: "2MB",
            height: 30,
            width: 90,
            fileTypeExts: '*.avi;*.mp3;*.mp4;*.bmp;*.ico;*.gif;*.jpeg;*.jpg;*.png;*.psd; *.rar;*.zip;*.swf;*.log;*.pdf;*.doc;*.docx;*.ppt;*.pptx;*.txt; *.xls; *.xlsx;',
            removeCompleted: false,
            onSelect: function (file) {
                $("#" + file.id).prepend('<div style="float:left;width:50px;margin-right:2px;"><img src="/Content/images/filetype/' + file.type.replace('.', '') + '.png" style="width:40px;height:40px;" /></div>');
                $('.border').hide();
            },
            onUploadSuccess: function (file, data) {
                $("#" + file.id).find('.uploadify-progress').remove();
                $("#" + file.id).find('.data').html(' 恭喜您，上传成功！');
                $("#" + file.id).prepend('<a class="succeed" title="删除" onclick=\'removeFile(' + data + ',this)\'><i class="fa fa-times-circle"></i></a>');
                $("#" + file.id).prepend('<a class="succeed" title="成功"><i class="fa fa-check-circle"></i></a>');
                list.push($.parseJSON(data));
            },
            onUploadError: function (file) {
                $("#" + file.id).removeClass('uploadify-error');
                $("#" + file.id).find('.uploadify-progress').remove();
                $("#" + file.id).find('.data').html(' 很抱歉，上传失败！');
                $("#" + file.id).prepend('<span class="error" title="失败"><i class="fa fa-exclamation-circle"></i></span>');
            }
        });
        $("#uploadify-button").prepend('<i style="opacity: 0.6;" class="fa fa-cloud-upload"></i>&nbsp;');
        $("#uploadify-queue").css("height", "655px");
        //$(document).scrollTop(300);
    }

    function uploadify1() {
        $("#uploadify1").uploadify({
            method: 'post',
            uploader: '/ResourceManage/RS_PStructs/UploadifyFile1',
            swf: top.contentPath + '/Content/scripts/plugins/uploadify/uploadify.swf',
            buttonText: "上传图片",
            fileSizeLimit: "2MB",
            height: 30,
            width: 90,
            multi: false,
            fileTypeExts: '*.bmp;*.ico;*.gif;*.jpeg;*.jpg;*.png;*.psd;',
            removeCompleted: false,
            onUploadSuccess: function (file, data) {
                $("#MainPic").val(data);
                $("#MainPicImg").attr("src", data);
            }
        });
        $("#uploadify1").css("float", "right");
        $("#uploadify1-queue").hide();
        //$(document).scrollTop(300);
    }

    //自适应预览
    function photoView(obj) {
        $(".photo-mask").show();
        $(".photo-panel").show();
        var src = $(obj).attr("src");
        if ($(obj).width() >= $(obj).height()) {
            $(".photo-panel .photo-div .photo-img .photo-view-h").attr("class", "photo-view-w");
            $(".photo-panel .photo-div .photo-img .photo-view-w img").attr("src", src);
        } else {
            $(".photo-panel .photo-div .photo-img .photo-view-w").attr("class", "photo-view-h");
            $(".photo-panel .photo-div .photo-img .photo-view-h img").attr("src", src);
        }


    }

    function removeFile(data, obj) {
        $(obj).parent().remove();
        list.splice($.inArray(data, list), 1);
    }
</script>
<div>
    <input id="type" type="hidden" />
    <ul class="nav nav-tabs">
        <li class="active"><a href="#BaseInfo" data-toggle="tab" id="Bois">基本信息</a></li>
        <li><a href="#ImageInfo" data-toggle="tab" id="ImIn">相关图档</a></li>
        <li><a href="#roomPanel" data-toggle="tab" id="HouseO" style="display:none">房间物品</a></li>
        <li><a href="#ExpandInfo" data-toggle="tab" id="Other">其他信息</a></li>
    </ul>
    <div class="tab-content" style="padding-top: 15px;">
        <div style="margin-left: 10px; margin-top: 20px; margin-right: 30px;" id="BaseInfo" class="tab-pane active">
            <table class="form" id="BaseInfo1">
                <tr>
                    <th class="formTitle">隶属机构<font face="宋体">*</font></th>
                    <td class="formValue">
                        <div id="OrganizeId" type="select" class="ui-select" isvalid="yes" checkexpession="NotNull"></div>
                    </td>
                    <th class="formTitle">房产性质<font face="宋体">*</font></th>
                    <td class="formValue">
                        <div id="Type" type="select" class="ui-select" isvalid="yes" checkexpession="NotNull"></div>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">房产编号<font face="宋体">*</font></th>
                    <td class="formValue">
                        <input id="Code" type="text" onblur="$.ExistField(this.id, '../../ResourceManage/RS_PStructs/ExistCode')" class="form-control" isvalid="yes" checkexpession="NotNull" />
                    </td>
                    <th class="formTitle">房产名称<font face="宋体">*</font></th>
                    <td class="formValue">
                        <input id="Name" type="text" @*onblur="$.ExistField(this.id, '../../ResourceManage/RS_PStructs/ExistName')" *@ class="form-control" placeholder="请输入名称" isvalid="yes" checkexpession="NotNull" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">隶属上级<font face="宋体"></font><input type="hidden" id="fclx" value="0" /></th>
                    <td class="formValue">
                        <div id="PStructTree" type="selectTree" class="ui-select" isvalid="yes" checkexpession="IsScript"></div>
                    </td>
                    <th class="formTitle">房产全称</th>
                    <td class="formValue">
                        <input id="AllName" type="text" disabled class="form-control" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle MainPic">主图</th>
                    <td class="formValue MainPic">
                        <input id="MainPic" type="text" class="form-control" style="display:none;" readonly="readonly" />
                        <img src="http://tstapi.pdgzf.com:810/Resource/PStructFile/b0355439-6c4d-47d9-8e09-aede63997a4b/20171031/800ccefa-4d39-41d9-8a50-5fc1568402f6.jpg" title="主图" id="MainPicImg" style="width:36px;display:inline;height:36px;" onclick="photoView(this)" />
                        <input id="uploadify1" name="uploadify" type="file" />
                        <div class="photo-mask" style="width: 1000px;height:570px;"></div>
                        <div class="photo-panel" style="width: 720px; height: 460px; margin-top: 0px; position: fixed; left: 145px;top:5px;">
                            <div class="photo-div">
                                <div class="photo-img">
                                    <div class="photo-bar">
                                        <div class="photo-close"></div>
                                    </div>
                                    <div class="photo-view-h">
                                        <img src="" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </td>
                    <th class="formTitle">
                        juniornum
                    </th>
                    <td class="formValue">
                        <input id="JuniorNum" type="number" class="form-control" value="1" isvalid="yes" checkexpession="IsScript" />
                    </td>
                </tr>
                <tr>
                    <td colspan="4">
                        <!-- 楼盘 -->
                        <table class="form" id="PProperty" style="display: block ">
                            <tr class="PropertyForm">
                                <th class="formTitle">所属省市区</th>
                                <td class="formValue" colspan="3">
                                    <div id="Province" type="select" class="ui-select" style="width: 208px; float: left; margin-right: 10px; "></div>
                                    <div id="City" type="select" class="ui-select" style="width: 208px; float: left; margin-right: 10px;"></div>
                                    <div id="Region" type="select" class="ui-select" style="width: 208px; float: left; margin-right: 10px; "></div>
                                    <div id="Township" type="select" class="ui-select" style="width: 208px; float: left; "></div>
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">详细地址</th>
                                <td class="formValue" colspan="3">
                                    <input id="Address" type="text" class="form-control" onblur="GetGeocoding()" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">环线</th>
                                <td class="formValue">
                                    <input id="CicleLine" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                                </td>
                                <th class="formTitle">地铁</th>
                                <td class="formValue">
                                    <input id="Metro" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">经度</th>
                                <td class="formValue">
                                    <input id="LAT" type="text" readonly="readonly" class="form-control" isvalid="yes" checkexpession="IsScript" />
                                </td>
                                <th class="formTitle">纬度</th>
                                <td class="formValue">
                                    <input id="LNG" type="text" readonly="readonly" class="form-control" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">总建筑面积</th>
                                <td class="formValue" id="PropertyArea">
                                    <input id="Area" type="number" class="form-control" value="0" isvalid="yes" checkexpession="IsScript" />
                                </td>
                                <th class="formTitle">占地面积</th>
                                <td class="formValue">
                                    <input id="CoverArea" type="number" class="form-control" value="0" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">绿化面积</th>
                                <td class="formValue">
                                    <input id="GreenArea" type="number" class="form-control" value="0" isvalid="yes" checkexpession="IsScript" />
                                </td>
                                <th class="formTitle">容积率</th>
                                <td class="formValue">
                                    <input id="VolumeRate" type="number" class="form-control" value="0" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">绿化率</th>
                                <td class="formValue">
                                    <input id="GreenRate" type="number" class="form-control" value="0" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">项目类型</th>
                                <td class="formValue" id="PPropertyType">
                                    <div id="PropertyType1" type="select" class="ui-select" isvalid="yes" checkexpession="IsScript"></div>
                                </td>
                                <th class="formTitle">建成年份</th>
                                <td class="formValue">
                                    <input id="CreateYear" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">开发商</th>
                                <td class="formValue">
                                    <input id="DeveloperName" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                                </td>
                                <th class="formTitle">物业公司</th>
                                <td class="formValue">
                                    <input id="PropertyCompany" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                            <tr class="PropertyForm">
                                <th class="formTitle">物业标准费</th>
                                <td class="formValue">
                                    <input id="FeeItemRule" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                                </td>
                                <th class="formTitle">接盘日期</th>
                                <td class="formValue">
                                    <input id="Date" type="text" class="form-control input-wdatepicker" onfocus="WdatePicker({})" value="@DateTime.Now.ToString("yyyy-MM-dd")" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">
                                    附加说明
                                </th>
                                <td class="formValue" id="PropertyMemo" colspan="3">
                                    <textarea id="Memo" class="form-control" style="height: 70px;" isvalid="yes" checkexpession="IsScript"></textarea>
                                </td>
                            </tr>
                        </table>
                        <!--楼阁-->
                        <table class="form" id="PPavilion" style="display:none">
                            <tr>
                                <th class="formTitle">占地面积</th>
                                <td class="formValue" style="width:570px;">
                                    <input id="CoverAreaPavilion" type="number" class="form-control" value="0" isvalid="yes" checkexpession="IsScript" />
                                </td>

                                <th class="formTitle">楼高</th>
                                <td class="formValue" style="width:570px;">
                                    <input id="Height" type="number" class="form-control" value="0" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">接盘日期</th>
                                <td class="formValue" colspan="3">
                                    <input id="DatePavilion" type="text" class="form-control input-wdatepicker" onfocus="WdatePicker({})" value="@DateTime.Now.ToString("yyyy-MM-dd")" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                        </table>
                        <!--楼层-->
                        <table class="form" id="PFloor" style="display:none">
                            <tr>
                                <th class="formTitle">面积</th>
                                <td class="formValue" style="width:570px;">
                                    <input id="AreaFloor" type="number" class="form-control" value="0" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                        </table>
                        <!--车库/广告位区域/场地区域/冷库-->
                        <table class="form" id="PGarage" style="display:none">
                            <tr>
                                <th class="formTitle">面积</th>
                                <td class="formValue" style="width:570px;">
                                    <input id="AreaGarage" type="number" class="form-control" value="0" isvalid="yes" checkexpession="IsScript" />
                                </td>
                                <th class="formTitle">交付日期</th>
                                <td class="formValue" style="width:570px;">
                                    <input id="DateGarage" type="text" class="form-control input-wdatepicker" onfocus="WdatePicker({})" value="@DateTime.Now.ToString("yyyy-MM-dd")" />
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">总数量</th>
                                <td class="formValue">
                                    <input id="Num" type="number" class="form-control" value="0" isvalid="yes" checkexpession="IsScript" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                        </table>
                        <!--房间-->
                        <table class="form" id="PRoom" style="display:none">
                            <tr>
                                <th class="formTitle">物业类型</th>
                                <td class="formValue" id="PRoomType" style="width:570px;">
                                    <div id="PropertyType2" type="select" class="ui-select" isvalid="yes" checkexpession="IsScript"></div>
                                </td>
                                <th class="formTitle">当前状态</th>
                                <td class="formValue" style="width:570px;">
                                    <div id="State" type="select" class="ui-select" isvalid="yes" checkexpession="IsScript"></div>
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">户型</th>
                                <td class="formValue">
                                    <div id="HouseTypeName" type="select" class="ui-select"></div>
                                </td>
                                <th class="formTitle">朝向</th>
                                <td class="formValue">
                                    <div id="HouseType" type="select" class="ui-select"></div>
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">建筑面积</th>
                                <td class="formValue" id="RoomArea">
                                    @*<input id="Area" type="number" class="form-control" isvalid="yes" checkexpession="IsScript" />*@
                                </td>
                                <th class="formTitle">套内面积</th>
                                <td class="formValue">
                                    <input id="ComprisingConstructionArea" type="number" class="form-control" value="0" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">实用面积</th>
                                <td class="formValue">
                                    <input id="ActualArea" type="number" class="form-control" value="0" isvalid="yes" checkexpession="IsScript" />
                                </td>
                                <th class="formTitle">计费面积</th>
                                <td class="formValue">
                                    <input id="ChargingArea" type="number" class="form-control" value="0" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">起租日期</th>
                                <td class="formValue">
                                    <input id="EMoveInDate" type="text" class="form-control input-wdatepicker" onfocus="WdatePicker({})" value="@DateTime.Now.ToString("yyyy-MM-dd")" />
                                </td>
                                <th class="formTitle">月租金</th>
                                <td class="formValue">
                                    <input id="MonthlyRent" type="number" class="form-control" value="0" isvalid="yes" checkexpession="IsScript" />
                                </td>
                            </tr>
                            <tr>
                                <th class="formTitle">
                                    招租标题
                                </th>
                                <td class="formValue" colspan="3">
                                    <textarea id="RentTitle" class="form-control" style="height: 70px;" isvalid="yes" checkexpession="IsScript"></textarea>
                                </td>
                            </tr>

                            <tr>
                                <th class="formTitle">
                                    说明
                                </th>
                                <td class="formValue" id="RoomMemo" colspan="3">
                                    @*<textarea id="Memo" class="form-control" style="height: 70px;"isvalid="yes" checkexpession="IsScript" ></textarea>*@
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </div>
        <div id="ImageInfo" class="form" style="display:none">
            <div style="margin: 10px">
                <div style="height: 38px;">
                    <input id="uploadify" name="uploadify" type="file" />
                </div>
                <div class="border" style="height: 655px; border-radius: 5px;">
                    <div class="drag-tip" style="text-align: center; padding-top: 100px;">

                    </div>
                </div>
            </div>
        </div>

        <div id="roomPanel" style="margin-left:10px;margin-right:30px;display:none">
            <div class="toolbar" style="margin-left: 800px;margin-bottom:10px;">
                <div class="btn-group">
                    <a id="lr-addRule" class="btn btn-success btn-xs" onclick="btn_add_field()"><i class="fa fa-plus"></i>&nbsp;添加</a>
                    <a id="lr-editRule" class="btn btn-info btn-xs" onclick="btn_edit_field()"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
                    <a id="lr-deleteRule" class="btn btn-danger btn-xs" onclick="btn_delete_field()"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
                </div>


            </div>
            <table id="gridTable"></table>
        </div>
        <div id="ExpandInfo" class="tab-pane " style="margin-left: 10px;  margin-right: 30px;">
            <div class="form" id="Property">
                @*<ul class="nav nav-tabs">
                        <li class="active"><a href="#PropertyInfo" data-toggle="tab">物业公司资料</a></li>
                        <li><a href="#DeveloperInfo" data-toggle="tab">发展商资料</a></li>
                        <li><a href="#AgentsInfo" data-toggle="tab">代理商资料</a></li>
                    </ul>
                    <div class="tab-content" style="padding-top: 10px;">
                        <div style="margin-left: 10px; margin-top: 20px; margin-right: 30px;" id="PropertyInfo" class="tab-pane active">
                            <table class="form">
                                <tr>
                                    <th class="formTitle">公司名称</th>
                                    <td class="formValue">
                                        <input id="PropertyCompany" type="text" class="form-control" />
                                    </td>
                                    <th class="formTitle">法人代表</th>
                                    <td class="formValue">
                                        <input id="PropertyCompanyLegal" type="text" class="form-control" />
                                    </td>
                                </tr>
                                <tr>
                                    <th class="formTitle">管理处</th>
                                    <td class="formValue">
                                        <input id="" type="text" class="form-control" />
                                    </td>
                                </tr>
                                <tr>
                                    <th class="formTitle">联系人</th>
                                    <td class="formValue">
                                        <input id="PropertyContactPeople" type="text" class="form-control" />
                                    </td>
                                    <th class="formTitle">联系电话</th>
                                    <td class="formValue">
                                        <input id="PropertyTel" type="text" class="form-control" />
                                    </td>
                                </tr>
                                <tr>
                                    <th class="formTitle">联系地址</th>
                                    <td class="formValue" colspan="3">
                                        <input id="PropertyAddress" type="text" class="form-control" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="DeveloperInfo" class="tab-pane " style="margin-left: 10px; margin-top: 20px; margin-right: 30px;">
                            <table class="form">
                                <tr>
                                    <th class="formTitle">公司名称</th>
                                    <td class="formValue">
                                        <input id="DeveloperName" type="text" class="form-control" />
                                    </td>
                                    <th class="formTitle">法人代表</th>
                                    <td class="formValue">
                                        <input id="DeveloperCorporateName" type="text" class="form-control" />
                                    </td>
                                </tr>
                                <tr>
                                    <th class="formTitle">联系人</th>
                                    <td class="formValue">
                                        <input id="" type="text" class="form-control" />
                                    </td>
                                    <th class="formTitle">联系电话</th>
                                    <td class="formValue">
                                        <input id="DeveloperTel" type="text" class="form-control" />
                                    </td>
                                </tr>
                                <tr>
                                    <th class="formTitle">联系地址</th>
                                    <td class="formValue" colspan="3">
                                        <input id="DeveloperAddress" type="text" class="form-control" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="AgentsInfo" class="tab-pane " style="margin-left: 10px; margin-top: 20px; margin-right: 30px;">
                            <table class="form" hidden="hidden">
                                <tr>
                                    <th class="formTitle">公司名称</th>
                                    <td class="formValue">
                                        <input id="" type="text" class="form-control" />
                                    </td>
                                    <th class="formTitle">法人代表</th>
                                    <td class="formValue">
                                        <input id="" type="text" class="form-control" />
                                    </td>
                                </tr>
                                <tr>
                                    <th class="formTitle">联系人</th>
                                    <td class="formValue">
                                        <input id="AgentsName" type="text" class="form-control" />
                                    </td>
                                    <th class="formTitle">联系电话</th>
                                    <td class="formValue">
                                        <input id="AgentsTel" type="text" class="form-control" />
                                    </td>
                                </tr>
                                <tr>
                                    <th class="formTitle">联系地址</th>
                                    <td class="formValue" colspan="3">
                                        <input id="AgentsAddress" type="text" class="form-control" />
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>*@
            </div>
            <div class="form" id="UserInfo" style="display:none;">
                <input id="btn_User" style="width:90px;" type="button" class="form-control" value="添加" />
                <table id="UserTable">
                    <tr>
                        <th class="formTitle">住户类别</th>
                        <td class="formValue">
                            <div id="Flag" class="btn-group ">
                                <a class="btn btn-default dropdown-text" data-toggle="dropdown" data-value="0" style="width: 207px;">公司</a>
                                <a class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
                                <ul class="dropdown-menu">
                                    <li onclick="btn_Flag(this)"><a data-value="0">公司</a></li>
                                    <li onclick="btn_Flag(this)"><a data-value="1">个人</a></li>
                                </ul>
                            </div>
                        </td>
                        <th class="formTitle">住户类型</th>
                        <td class="formValue">
                            <div id="Type" class="btn-group">
                                <a class="btn btn-default dropdown-text" data-toggle="dropdown" data-value="0" style="width: 190px; ">业主</a>
                                <a class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
                                <ul class="dropdown-menu">
                                    <li onclick="btn_Type(this)"><a data-value="0">业主</a></li>
                                    <li onclick="btn_Type(this)"><a data-value="1">租户</a></li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle" id="isEnterprise">公司名称<font face="宋体">*</font></th>
                        <td class="formValue">
                            <input id="CampanyName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
                        </td>
                        <th class="formTitle">编码<font face="宋体">*</font></th>
                        <td class="formValue">
                            <input id="Code" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
                        </td>
                    </tr>
                    <tr class="Enterprise">
                        <th class="formTitle">经营种类</th>
                        <td class="formValue">
                            <input id="BCategory" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                        <th class="formTitle">经营品牌</th>
                        <td class="formValue">
                            <input id="Brand" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                    </tr>
                    <tr class="Enterprise">
                        <th class="formTitle">营业执照号</th>
                        <td class="formValue">
                            <input id="License" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                        <th class="formTitle" id="isFlag">法人名称</th>
                        <td class="formValue">
                            <input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle">手机号码</th>
                        <td class="formValue">
                            <input id="Phone" type="number" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                        <th class="formTitle">联系电话</th>
                        <td class="formValue">
                            <input id="LinkPhone" type="number" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                    </tr>
                    <tr class="Enterprise">
                        <th class="formTitle">紧急联系人</th>
                        <td class="formValue">
                            <input id="LinkName" type="number" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                        <th class="formTitle">紧急联系电话</th>
                        <td class="formValue">
                            <input id="LinkPhone1" type="number" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle">联系地址</th>
                        <td class="formValue">
                            <input id="LinkAddress" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                        <th class="formTitle">出生年月</th>
                        <td class="formValue">
                            <input id="Birth" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle">性别</th>
                        <td class="formValue">
                            <div id="Gender" class="btn-group">
                                <a class="btn btn-default dropdown-text" data-toggle="dropdown" data-value="0" style="width: 207px; ">男</a>
                                <a class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret"></span></a>
                                <ul class="dropdown-menu">
                                    <li onclick="btn_Sex(this)"><a data-value="0">男</a></li>
                                    <li onclick="btn_Sex(this)"><a data-value="1">女</a></li>
                                </ul>
                            </div>
                        </td>
                        <th class="formTitle">身份证号</th>
                        <td class="formValue">
                            <input id="IDCard" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle">民族</th>
                        <td class="formValue">
                            <input id="Nation" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                        <th class="formTitle">家庭住址</th>
                        <td class="formValue">
                            <input id="Address" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle">Fax</th>
                        <td class="formValue">
                            <input id="Fax" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                        <th class="formTitle">Email</th>
                        <td class="formValue">
                            <input id="Email" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                    </tr>
                    <tr>
                        <th class="formTitle">WebChat</th>
                        <td class="formValue">
                            <input id="WeChat" type="text" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                        <th class="formTitle">QQ</th>
                        <td class="formValue">
                            <input id="QQ" type="number" class="form-control" isvalid="yes" checkexpession="IsScript" />
                        </td>
                    </tr>
                </table>
            </div>
            @*<div id="tishi" style="color:red;">请选择房产性质!</div>*@
        </div>

    </div>
</div>